package e

var MsgFlags = map[int]string{
	SUCCESS:       "处理成功",
	ERROR:         "处理失败",
	InvalidParams: "请求参数错误",

	ErrorAuthCheckTokenFail: "token验证失败",
	ErrorAuthCheckTokenTimeout: "token已过期",
	ErrorAuthCheckTokenEmpty: "token不能为空",
	ErrorUserPasswordNotFound: "登录失败，请检查用户名和密码",
	ErrorUserPasswordNotEmpty: "用户名或密码不能为空",

	ErrorDeptIdMustBeInt: "部门id必须为整数",
	ErrorDeptNotFound: "部门id不存在，请检查",

	ErrorFileNotExisted: "文件不存在，请检查",
}

// GetMsg get error information based on Code
func GetMsg(code int) string {
	msg, ok := MsgFlags[code]
	if ok {
		return msg
	}

	return MsgFlags[ERROR]
}
